A good answer might be:

  1. Did the two arrays have to contain the same number of elements?
    • No — the method will work for any length of array.
  2. Did the two arrays both have to be arrays of int?
    • Yes — the parameter must refer to an array of int

Picture of the Action

 

 

 

Here is a picture that shows what the executing program looks like just after the first call to the print method. It is the same as the previous picture, but now there are two arrays. The parameter x of the print() method refers to one of the arrays.

 



QUESTION 6:

Does the picture change when the second array is printed?